package com.py.tools;

import java.lang.reflect.Field;

import sun.misc.Unsafe;

public class UnsafeTools {

    public static Unsafe getUnsafe() {  
        try {  
            Field field = Unsafe.class.getDeclaredField("theUnsafe");  
            field.setAccessible(true);  
            return (Unsafe)field.get(null);  
        } catch (Exception e) {  
        }  
        return null;  
    }
}
